package com.base2.webshop.shared.requests;

import java.util.List;

import com.base2.webshop.server.dao.ProductDao;
import com.base2.webshop.server.locators.AbstractServiceLocator;
import com.base2.webshop.shared.proxies.ProductProxy;
import com.google.gwt.requestfactory.shared.InstanceRequest;
import com.google.gwt.requestfactory.shared.Request;
import com.google.gwt.requestfactory.shared.RequestContext;
import com.google.gwt.requestfactory.shared.Service;

@Service(value = ProductDao.class, locator = AbstractServiceLocator.class)
public interface ProductRequest extends RequestContext {
	Request<List<ProductProxy>> findAllProducts();

	Request<ProductProxy> findProduct(Long id);
	
	InstanceRequest<ProductProxy, Void> persist();

	InstanceRequest<ProductProxy, Void> remove();
}
